import request from "../utils/request";

export const login=(param)=>{
    return request({
        url:"login",
        method:"post",
        data:param
    })
}

export const getUsersByCondition = (param)=>{
    return request({
        url:"user/list",
        method:"get",
        params:param
    })
}
export const changeUserActive =  (param)=>{
    return request({
        url:"user/changeUserActive",
        method:"post",
        data:param
    })
}
export const addUser = (param)=>{
    return request({
        url:"user/add",
        method:"post",
        data:param
    })
}

export const editUser = (param)=>{
    return request({
        url:"user/edit",
        method:"post",
        data:param
    })
}
export const editUserinfo = (param)=>{
    return request({
        url:"user/editinfo",
        method:"post",
        data:param
    })
}
export const delUser = (param)=>{
    return request({
        url:"user/delete",
        method:"post",
        data:param
    })
}
export const reSetPassword = (param)=>{
    return request({
        url:"user/reSetPassword/"+param,
        method:"get"
    })
}
export const getUserByName = (param)=>{
    return request({
        url:"user/getUserByName/"+param,
        method:"get"
    })
}

